<?php
namespace Login\Form;

use Zend\Form\Form;
use Zend\InputFilter\InputFilter;

class LoginFormFilter extends InputFilter
{

    public function __construct($name = null)
    {
        $this->add(array(
            'name' => 'username',
            'attributes' => array(
                'required' => 'required'
            ),
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
                
            )
        ));
        
        $this->add(array(
            'name' => 'password',
            'required' => true,
            'validators' => array(
                array(
                    'name' => 'NotEmpty',
                    'options' => array(
                        'messages' => array(
                            \Zend\Validator\NotEmpty::IS_EMPTY => 'Empty'
                        )
                    )
                )
            )
        ));
    }
}